# 设置cmake最低版本
cmake_minimum_required(VERSION 3.4.1)


# 开启多线程加速
 FIND_PACKAGE( OpenMP REQUIRED)
 if(OPENMP_FOUND)
     message("OPENMP FOUND")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -static-openmp")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
 endif()



find_library( log-lib log )

include_directories(./ncnn-android-lib/include)

file(GLOB arcface_files "./arcface/*.cpp")

set(NCNN_SRC_LISTS
        ${arcface_files}
        jni.cpp
        )

add_library(
        lib-insight-face-recognition
        SHARED
        ${NCNN_SRC_LISTS})



target_link_libraries(
        lib-insight-face-recognition
        ${CMAKE_SOURCE_DIR}/ncnn-android-lib/${ANDROID_ABI}/libncnn.a
        ${log-lib})